PROJECT(libofd)

AUX_SOURCE_DIRECTORY(. LIBOFD_SRCS)

INCLUDE_DIRECTORIES(
    /usr/local/include/freetype2
)

ADD_LIBRARY(ofd SHARED ${LIBOFD_SRCS})
SET_TARGET_PROPERTIES(ofd PROPERTIES CLEAN_DIRECT_OUTPUT 1)

ADD_LIBRARY(ofd_static STATIC ${LIBOFD_SRCS})
#SET_TARGET_PROPERTIES(ofd_static PROPERTIES OUTPUT_NAME "ofd")
SET_TARGET_PROPERTIES(ofd_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)

#TARGET_LINK_LIBRARIES(ofd freetype cairo tinyxml2 zip stdc++)
TARGET_LINK_LIBRARIES(ofd ${LIBOFD_DEPENDICES})

INSTALL(TARGETS ofd ofd_static
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
)

